<!--
*Author：富行天下团队
 
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/Tube/Tube.js此处编写
 -->
<template>
  <div>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields" :editFormFileds="editFormFields" :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields" :searchFormFileds="searchFormFields" :searchFormOptions="searchFormOptions" :table="table" :extend="extend">
    </view-grid>
  </div>
</template>

<script>
import extend from '@/extension/Tube/Tube.js'
import ViewGrid from '@/components/basic/ViewGrid.vue'
var vueParam = {
  components: {
    ViewGrid,
  },
  data() {
    return {
      table: {
        key: 'tube_id',
        footer: 'Foots',
        cnName: '场馆列表',
        name: 'Tube',
        url: '/Tube/',
        sortName: 'tube_id',
      },
      extend: extend,
      editFormFields: {
        tube_code: '',
        tube_name: '',
        tube_image: [],
        tube_remark: '',
        tube_status_remark: '',
        is_reserve: '',
        tube_status: '',
        tube_sort: '',
        creator: '',
        createID: '',
        createDate: '',
        modifier: '',
        modifyID: '',
        modifyDate: '',
        merchantCode: '',
        merchantName: '',
      },
      editFormOptions: [
        [
          { title: '场馆名称', field: 'tube_name', required: true, type: 'text', colSize: 6 },
          { title: '场馆权重', field: 'tube_sort', type: 'number', colSize: 6 },
        ],
        [{ title: '场馆封面图', maxSize: 1, field: 'tube_image', type: 'imgupgrade', colSize: 12, maxFile: 1, multiple: true,required: false,}],
        [{ title: '场馆描述', field: 'tube_remark', type: 'textarea', colSize: 12,showWordLimit:true,maxlength:250, placeholder: "最多只能输入255个字符" }],
        [
          { dataKey: 'TubeStatus', data: [], title: '场馆状态', required: true, field: 'tube_status', type: 'radio', colSize: 6 },
          { dataKey: 'enable', data: [], title: '是否需要预约', required: true, field: 'is_reserve', type: 'radio', colSize: 6 },
        ],
        [{ title: '状态描述', field: 'tube_status_remark', type: 'textarea',showWordLimit:true,maxlength:250,  colSize: 12, placeholder: "最多只能输入255个字符"}],
      ],
      searchFormFields: { tube_name: '' },
      searchFormOptions: [[{ title: '场馆名称', field: 'tube_name', type: 'like' }]],
      columns: [
        { field: 'tube_id', title: '场馆编码', type: 'string', width: 220, align: 'left', sortable: true, hidden: true },
        { field: 'tube_code', title: '场馆编码', type: 'string', width: 120, align: 'left', sortable: true },
        { field: 'tube_name', title: '场馆名称', type: 'string', width: 120, align: 'left' },
        { field: 'tube_image', title: '场馆封面图', type: 'imgupgrade', width: 90, align: 'left' },
        { field: 'tube_remark', title: '场馆描述', type: 'string', width: 220, align: 'left', show: true },
        { field: 'tube_status', title: '场馆状态', bind: { key: 'TubeStatus', data: [] }, width: 80, align: 'left' },
        // { field: 'is_reserve', title: '场馆状态', bind: { key: 'enable', data: [] }, width: 80, align: 'left' },
        { field: 'tube_status_remark', title: '场馆状态描述', type: 'string', width: 220, align: 'left', show: true },
        { field: 'creator', title: '创建人', type: 'string', width: 100, align: 'left', show: true },
        { field: 'createDate', title: '创建时间', type: 'datetime', width: 160, align: 'left', sortable: true },
        { field: 'modifier', title: '修改人', type: 'string', width: 100, align: 'left', show: true },
        { field: 'modifyDate', title: '修改时间', type: 'datetime', width: 160, align: 'left', sortable: true },
      ],
      detail: {
        cnName: '场次列表',
        columns: [
          { field: 'screen_id', title: '主键', type: 'int', width: 90, hidden: true, readonly: true, require: true, align: 'left' },
          //{field:'tube_name',title:'场馆名称',type:'string',width:220,align:'left',sortable:true},
          //    {field:'tube_code',title:'场馆名称',type:'string',width:150,align:'left',bind:{ key:'ScreenStatus',data:[]},edit:{type:"select",dataKey:"ScreenStatus",data:[]},show:true},
          { field: 'screen_name', title: '场次名称', type: 'string', width: 150, align: 'left', show: true, edit: true },
          //    {field:'screen_code',title:'场次编码',type:'select',width:150,align:'left',show:true},
          { field: 'timeContainer', title: '起止时间', type: 'is-range', width: 150, align: 'left', edit: { type: 'is-range' } },
          //    {field:'screen_start_time',title:'开始时间',type:'string',width:80,align:'left',sortable:true,hidden:true},
          //    {field:'screen_end_time',title:'结束时间',type:'string',width:80,align:'left',sortable:true,hidden:true},
          { field: 'screen_number', title: '场地数量', type: 'int', width: 120, align: 'left', edit: { type: 'number' } },
          { field: 'screen_time', title: '时段数量', type: 'int', width: 120, align: 'left', edit: { type: 'number' } },
          { field: 'screen_sort', title: '排序', type: 'string', width: 120, align: 'left', edit: { type: 'number' } },
          { field: 'screen_remark', title: '场次备注', type: 'string', width: 220, align: 'left', show: true, edit: true },
          { field: 'is_halftime', title: '是否开启半场', type: 'switch', width: 110, align: 'left', edit: { type: 'switch' } },
          { field: 'creator', title: '创建人', type: 'string', width: 100, align: 'left', show: true },
          { field: 'createDate', title: '创建时间', type: 'datetime', width: 160, align: 'left', sortable: true },
          { field: 'modifier', title: '修改人', type: 'string', width: 100, align: 'left', show: true },
          { field: 'modifyDate', title: '修改时间', type: 'datetime', width: 160, align: 'left', sortable: true },
        ],
        sortName: 'screen_id',
        key: 'tube_id',
      },
    }
  },
}
export default vueParam
</script>
